﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Windows;

namespace nLearning
{
    public class Message
    {
        public static bool Confirm(string what_do_u_wanna_confirm)
        {
            string msg = cString.ID("msg.confirm") + "?";
            cMessage msgBox = new cMessage(string.Format(msg,what_do_u_wanna_confirm), cMessage.BUTTON_TYPE.YESNO);
            var res = msgBox.ShowDialog();
            if (res == true)
                return true;
            else
                return false;
        }

        public static void Info(string what_message)
        {
            //System.Windows.Forms.MessageBox.Show(null, what_message, cString.ID("title.info"), MessageBoxButtons.OK, MessageBoxIcon.Information);
            cMessage msg = new cMessage(what_message, cMessage.BUTTON_TYPE.OK);
            msg.ShowDialog();
        }

        public static void Error(string what_message)
        {
            string headerMsg = cString.ID("error.top");
            string contactMsg = cString.ID("error.bottom");
            string err_message = string.Format("{0}\n\n{1}\n\n{2}",headerMsg,what_message,contactMsg);
            //System.Windows.Forms.MessageBox.Show(null, err_message, cString.ID("title.error"), MessageBoxButtons.OK, MessageBoxIcon.Error);
            cMessage msg = new cMessage(err_message, cMessage.BUTTON_TYPE.OK);
            msg.ShowDialog();
        }
    }
}
